
    let goodsAllDatas
    let url=window.location .href;
    let temp = url;
    let aa=url.indexOf('=');
    if (aa>-1){
        url=url.substring(aa+1); //获取到商品的id信息
    }
    let goodsPrice
    $.ajax({
        url: 'http://localhost:8080/evaluate-base-info/price?goodsId=' + url,
        type: 'get',
        dataType: 'json'
    }).then(res => {  // res 对应的是 result
        allData = res.data // 返回的数据是 [{}, {}, {}]
        // console.log(allData)
        goodsAllDatas = allData
        goodsPrice = allData.goodCost
        let maxPrice = allData.goodFirstPrice
        if (allData.goodSecondPrice > maxPrice){
            maxPrice = allData.goodSecondPrice
        }
        if (allData.goodThirdPrice > maxPrice){
            maxPrice = allData.goodThirdPrice
        }
        if (allData.goodForthPrice > maxPrice){
            maxPrice = allData.goodForthPrice
        }
        if (allData.goodFifthPrice > maxPrice){
            maxPrice = allData.goodFifthPrice
        }
        $("#maxPrice").html(maxPrice)
        $('#showPhoneImg').prop('src',`http://localhost/images/${goodsAllDatas.goodImg}`)
        $(".goodsName").html(allData.goodName)
        var day_data = [
            {"elapsed": "6", "价格": allData.goodFirstPrice}
            , {"elapsed": "7", "价格": allData.goodSecondPrice}
            , {"elapsed": "8", "价格": allData.goodThirdPrice}
            , {"elapsed": "9", "价格": allData.goodForthPrice}
            , {"elapsed": "10", "价格": allData.goodFifthPrice}
        ];
        Morris.Line({
            element: 'graph',
            data: day_data,
            xkey: 'elapsed',
            ykeys: ['价格'],
            labels: ['价格'],
            parseTime: false
        });
    })

